package com.example.lianguisystem.mapperLianGui;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface CommonMapper {

    /**
     * 查找客户资料,作为下拉框的查询条件
     * @return
     */
    List<Map<String, Object>> listOfClient();
    /**
     * 查找客户资料,作为下拉框的查询条件
     * @return
     */
    List<String> listStringOfClient();

    /**
     * 获取品号信息，作为下拉框的查询条件
     * @return
     */
    List<Map<String,Object>> listByProdName(@Param("prodName") String prodName);

    /**
     * 提交时，获取表的billid
     * @param tableName
     * @return
     */
    Integer selectMaxBiillidByTableName(@Param("tableName") String tableName);


    /**
     * 提交时，获取表的最大seq，以形成单据编号
     *
     * @param pre
     * @param tableName
     * @return
     */
    Integer selectMaxSeq(@Param("pre") String pre, @Param("tableName") String tableName);

    /**
     * 提交时获取客户信息
     * @param code
     * @return
     */
    Map<String, Object> selectClientOfSubmit(@Param("code") String code);

    /**
     * 提交时获取用户信息
     * @param username
     * @return
     */
    Map<String, Object> selectUserData(@Param("username") String username);
    Map<String, Object> selectEmployData(@Param("username") String username);

    Map<String, Object> selectGoodsData(@Param("code") String code);

    Map<String, Object> selectPriceByProd(@Param("billType") Integer billType,@Param("unitid") Integer unitid, @Param("date") String date
            , @Param("storeid") Integer storeid, @Param("goodsid") Integer goodsid, @Param("traderid") Integer traderid
            , @Param("moneyid") Integer moneyid, @Param("shopid") Integer shopid);


    Integer execup_ab_billprint_insert(@Param("billType") Integer billType, @Param("billid") Integer billid, @Param("billCode") String billCode
            , @Param("data") String data, @Param("opid") Integer opid, @Param("shopid") Integer shopid);


    List<String> listOfWorkshopOsString(@Param("username") String username);
    List<Map<String,Object>> listOfWorkshopOsSelection();
}
